A high-speed network environment typically includes network devices such as routers and switches that facilitate delivery of information packets from source devices to destination devices. Information pertaining to the transfer of packet(s) through the network is usually embedded within one or more packets. Each packet traveling through a network can typically be treated independently from other packets in a packet stream. For example, each router within a network processes incoming packets and determines where the packet(s) should be forwarded. In a high-speed computing network environment, the speed of packet processing or routing can be critical in determining the performance of over all network system.
In order to determine the action to be performed on an incoming packet, a router needs to classify a packet based on information contained in the packet. Typical routers employ content-addressable memories (CAMs) to perform the classification step of packet processing at relatively high rates. Every incoming packet is parsed and the control information contained within the packet is used to create a key, which is used to look up the contents of the CAM. If a valid entry is present in the CAM for that key, the corresponding result can be used to classify the packet. When no valid entry is present, it is indicative of a new flow of packets. A packet flow or flow of packet or flow is a packet stream traveling from a given source and a given destination. New packet flows are constantly being created at various source devices, based on user applications. The router, for example, typically needs to learn new flows based on the first packet of the flow being detected. In order to develop the capability to quickly process future packets belonging to the same flow, the router needs to learn the flow. A process of learning a new flow or a learning process is usually slow and can be one of the choke points in a high-speed router.
A problem associated with a CAM learn request is that in a high speed network element, it is possible that multiple CAM learn requests can happen within the CAM accessing latency period. When two or more CAM learn requests are created due to the same flow, duplicated CAM entries for a single flow may occur. For example, two consecutive flows or packets having the similar source addresses, destination addresses and similar data types could be leaned twice by CAM. A conventional approach to address this issue is to throttle the learn requests to be less than or equal to the CAM access speed, which however compromises the performance of router.